package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.constant.CacheConstants;
import com.ruoyi.common.core.constant.UserConstants;
import com.ruoyi.common.core.exception.ServiceException;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.redis.service.RedisService;
import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.domain.Test;
import com.ruoyi.system.mapper.SysConfigMapper;
import com.ruoyi.system.mapper.TestMapper;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ITestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.Collection;
import java.util.List;

/**
 * 参数配置 服务层实现
 * 
 * @author ruoyi
 */
@Service
public class TestServiceImpl implements ITestService
{
    @Autowired
    private TestMapper mapper;


    @Override
    public boolean saveTest(Test test) {
        return mapper.insertTest(test)==1?true:false;
    }

    @Override
    public boolean updateTest(Test test) {
        return mapper.updateById(test)==1?true:false;
    }

    @Override
    public boolean deleteTests(List<Integer> ids) {
        return mapper.deleteByIds(ids)==ids.size()?true:false;
    }

    @Override
    public Test queryById(Integer id) {
        return mapper.selectById(id);
    }

    @Override
    public List<Test> queryTests() {
        return mapper.selectTests();
    }
}
